package nimble.collections;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.LinkedHashSet;

public class NimbleCollections {

    private static final Logger logger= LoggerFactory.getLogger(NimbleCollections.class);

    public static void main(String[] args)
    {
        LinkedHashSet<User> us=new LinkedHashSet<>();
        User u1=new User();
        u1.setAge(30);
        User u2=new User();
        u2.setAge(13);
        us.add(u1);
        us.add(u2);
        logger.info("size:{}",us.size());
        for (User u:us
             ) {
            logger.info("age:{}",u.getAge());
        }
    }
}